Skip to content

Zigbee Lock: Support SLGA Migration#2939

Open
hcarter-775 wants to merge 5 commits intomainfrom
re-structure/feature/chad-16364
Open

Zigbee Lock: Support SLGA Migration#2939
hcarter-775 wants to merge 5 commits intomainfrom
re-structure/feature/chad-16364

Conversation

@hcarter-775
Copy link
Copy Markdown
Contributor

@hcarter-775 hcarter-775 commented May 1, 2026

Description of Change

Follow-up to #2937, where I've responded to some comments that myself and others have left in order to clarify certain functionality.

Note on structure: The legacy-handlers subdriver keeps some subdrivers that have specific non-conformant behavior that relates specifically to lockCodes. This includes lock-without-codes, which no longer needs to exist in the modern implementation, as well as the yale-fingerprint-lock subdriver, which sets the lockCodes maxCodes state. Similarly, the yale subdriver has lockCodes-specific behavior as well.

However, upon analysis it was clear that the sub-sub-driver yale-bad-battery-reporter subdriver was 1. not unique to yale, and 2. was distinct from any lockCodes behavior, so it was pulled out into the now default subdrivers. Also, the samsungds subdriver had minimal differences between the old and new handling, so I condensed them.

The other primary thing that was removed from the now-legacy-handlers subdriver is the old added handler, for the following 2 reasons. 1. Generally, devices should not be added to this driver any longer, and 2. We now use the added main driver implementation to initially set the migrated keyword to true.

I find the fact that the entire migrated state depends on a keyword set only once in added to be a little precarious, but nothing stands out to me initially at this not working.

Summary of Completed Tests

cbaumler and others added 2 commits May 1, 2026 09:33
First, I had AI do the following:
- Rename subdrivers: using-old-capabilities -> legacy-handlers,
  promote using-new-capabilities handlers to top-level defaults
- Make new capability handling the driver default; legacy-handlers
  subdriver overrides for pre-migration devices only
- Top-level vendor subdrivers (yale, samsungsds, yale-fingerprint-lock)
  now only activate for migrated devices to avoid double-dispatch
- Remove duplicate lock-without-codes top-level subdriver (handled
  entirely within legacy-handlers since these devices never migrate)
- Add init lifecycle handler to legacy-handlers to populate lockCodes
  state for pre-migration devices on driver restart

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Then, I cleaned up the driver further by fixing the git understanding of
what files were made in what year, and by introducing small changes to
altogether remove some sub-subdrivers from the legacy subdriver, and vice versa.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Test Results

   72 files    508 suites   0s ⏱️
2 802 tests 2 802 ✅ 0 💤 0 ❌
4 688 runs  4 688 ✅ 0 💤 0 ❌

Results for commit b36d8a8.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

File Coverage
All files 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/yale/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/zigbee_lock_utils.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/configurations.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/init.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/samsungsds/init.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against b36d8a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants